-- GENERATED SPELL FOR [Captain Melrache] --


function spell0_1665(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(8258,pUnit)
pUnit:RegisterEvent('Sorts_1665', 583, 1)
end

function spell1_1665(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1665', 594, 1)
end

function Sorts_1665(pUnit, Event)
local choix_sorts_1665 = math.random(0, 1)
if choix_sorts_1665 == 0 then
pUnit:RegisterEvent('spell0_1665', 1, 1)
end
if choix_sorts_1665 == 1 then
pUnit:RegisterEvent('spell1_1665', 1, 1)
end
end

function mob1665_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1665', math.random(1500, 3000), 1)
end

function mob1665_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1665_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1665_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1665, 1, 'mob1665_Action')
RegisterUnitEvent(1665, 2, 'mob1665_Leave')
RegisterUnitEvent(1665, 3, 'mob1665_Kill')
RegisterUnitEvent(1665, 4, 'mob1665_Die')
